package com.ruoyi.web.controller.hk;

import com.ruoyi.hk.domain.DocDepartment;
import com.ruoyi.hk.service.DocDepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/docDepartment")
@Api(tags = "医生科属接口")
public class DocDepartmentController {

    @Autowired
    private DocDepartmentService docDepartmentService;

    @GetMapping("/getDepartmentByType")
    @ApiOperation("获取医生科属列表")
    public ResponseEntity<?> getDepartmentByType(){
        List<DocDepartment> departments = docDepartmentService.getDepartmentByType();
        return ResponseEntity.ok(departments);
    }
}
